package ik.xcj.hostpital.manage.security;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UserDetails extends User {

    private Long id;

    public UserDetails(Long id,String username, String password, boolean status,
                       Collection<? extends GrantedAuthority> authorities) {
        super(username, password, status,
                true,true,true, authorities);
        this.id = id ;
    }
}
